package org.spring.test.v3;

import static org.junit.Assert.*;

import org.junit.Test;
import org.spring.context.ApplicationContext;
import org.spring.context.support.ClassPathXmlApplicationContext;
import org.spring.service.v3.PetStoreService;

public class ApplicationContextTestV2 {

	@Test
	public void testGetBeanProperty() {
		ApplicationContext context = new ClassPathXmlApplicationContext("petstore-v3.xml");
		PetStoreService petStore = (PetStoreService) context.getBean("petStore");
		assertNotNull(petStore.getAccountDao());
		assertNotNull(petStore.getItemDao());
		assertEquals(petStore.getVersion(), 1);
		assertEquals(petStore.getStr(), "2");
	}

}
